package domain;

import util.Node;

public class Food {
    private Node food;

    public Food(){
        initFood();
    }

    public Food(Node food) {
        this.food = food;
    }

    private void initFood() {
        this.food=new Node();
        this.food.random();

    }

    /**
     * 获取
     * @return food
     */
    public Node getFood() {
        return food;
    }

    /**
     * 设置
     * @param food
     */
    public void setFood(Node food) {
        this.food = food;
    }

    public String toString() {
        return "Food{food = " + food + "}";
    }
}
